%%
lim=19000;
n=lim/500;
mask=zeros(400,750,n+1);
counter =1;
for i = 1:500:lim
    mask(:,:,counter)=twoPhotonSegmentation(data{1}(:,:,i:i+499));
    counter = counter +1;
end